import request from "@/utils/request";

// 查询维保计划列表
export function listWbPlan(query) {
  return request({
    url: "/wb/wbPlan/list",
    method: "get",
    params: query,
  });
}

// 查询维保计划详细
export function getWbPlan(id) {
  return request({
    url: "/wb/wbPlan/" + id,
    method: "get",
  });
}

// 新增维保计划
export function addWbPlan(data) {
  return request({
    url: "/wb/wbPlan",
    method: "post",
    data: data,
  });
}

// 修改维保计划
export function updateWbPlan(data) {
  return request({
    url: "/wb/wbPlan",
    method: "put",
    data: data,
  });
}

// 删除维保计划
export function delWbPlan(id) {
  return request({
    url: "/wb/wbPlan/" + id,
    method: "delete",
  });
}

/**新增维保计划 */
export function newAddWbPlan(data) {
  return request({
    url: "/wb/wbPlan/savePlan",
    method: "post",
    data,
  });
}

/**修改维保计划 */
export function newUpdateWbPlan(data) {
  return request({
    url: "/wb/wbPlan/updatePlan",
    method: "post",
    data,
  });
}

/**删除维保计划 */
export function newDelWbPlan(data) {
  return request({
    url: "/wb/wbPlan/deletePlan",
    method: "post",
    data,
  });
}

/**获取维保计划详情 */
export function getWbDetail(data) {
  return request({
    url: "/wb/wbPlan/getPlanInfoById/?planId=" + data,
    method: "get",
  });
}
